'use strict';
module.exports = {
	/**
	 * 检测修改支付密码的手机号
	 * @url client/setting/kh/checkPhone 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid, number } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------

		let info = await vk.baseDao.findById({
			dbName: "uni-id-users",
			id: uid
		})

		if (info.mobile && info.mobile != number) return { code: -1, msg: '该手机号与绑定手机号不符，请重新输入！' }

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
